<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui"
      >
    <ui:composition template="/resources/default/template/plantilla.xhtml">

        <ui:define name="head">

            <f:loadBundle basename="company.general.label_es"  var="label" />
            <f:loadBundle basename="company.general.message_es" var="message" />

            <title><h:outputText value="#{label.title1}"/></title>
        </ui:define>


        <ui:define name="autocomplete"><ui:include src="../autocomplete/main.xhtml"/></ui:define>

        <ui:define name="moduleTitle">#{label.title1} #{company_general.nombre}  </ui:define>

        <ui:define name="content">
            <p:growl id="messages" showDetail="true"/>

            <h:form>
                <!--NOMBRE-->
                <div class="field">
                    <h:outputLabel for="nombre" value="#{label.field1}" class="label"/>
                    <h:inputText id="nombre" class="textfield" value="#{company_general.nombre}" disabled="#{company_general.acceso()}"/>
                </div>
                <!--DIRECCION-->
                <div class="field">
                    <h:outputLabel for="direccon" value="#{label.field2}" class="label"/>
                    <h:inputText id="direccion" class="textfield" value="#{company_general.direccion}" disabled="#{company_general.acceso()}"/>
                </div>
                <!--TELEFONO-->
                <div class="field">
                    <h:outputLabel for="telefono" value="#{label.field3}" class="label"/>
                    <h:inputText id="telefono" class="textfield" value="#{company_general.telefono}" disabled="#{company_general.acceso()}"/>
                </div>
                <!--CONTACTO-->
                <div class="field">
                    <h:outputLabel for="contacto" value="#{label.field4}" class="label"/>
                    <h:inputText id="contacto" class="textfield" value="#{company_general.contacto}" disabled="#{company_general.acceso()}"/>
                </div>

                <!--INSERTAR -->
                <h:commandButton value="#{label.button1}" class="button" actionListener="#{company_general.insert()}" onclick="return verificar('#{message.m7}')" rendered="#{company_general.accesoRendered()}"  >
                    <f:param name="required" value="true"/>
                </h:commandButton>
                <!--ACTUALIZAR -->
                <h:commandButton value="#{label.button2}" class="button" actionListener="#{company_general.update()}" onclick="return verificar('#{message.m8}')" rendered="#{company_general.accesoRendered()}">
                    <f:param name="required" value="true"/>
                </h:commandButton>
                <!--ELIMINAR -->
                <h:commandButton value="#{label.button3}" class="button" actionListener="#{company_general.delete()}" onclick="return verificar('#{message.m9}')" rendered="#{company_general.accesoRendered()}" />

            </h:form>
        </ui:define>

    </ui:composition>
</html>
